package com.sphd.beautysalon.presenter;


import com.android.volley.VolleyError;
import com.sphd.beautysalon.info.InorOutRecordInfo;
import com.sphd.beautysalon.model.InOrOutRecordModelImpl;
import com.sphd.beautysalon.view.InOrOutRecordView;

import java.util.List;

/**
* Created by Hu on 2016/12/23
*/

public class InOrOutRecordPresenterImpl implements InOrOutRecordPresenter {
    InOrOutRecordModelImpl inOrOutRecordModel;
    InOrOutRecordView inOrOutRecordView;

    public InOrOutRecordPresenterImpl(InOrOutRecordView inOrOutRecordView) {
        this.inOrOutRecordView = inOrOutRecordView;
        inOrOutRecordModel=new InOrOutRecordModelImpl();
    }

    @Override
    public void addData(String url) {
        inOrOutRecordView.showLoading();
        inOrOutRecordModel.snedUrl(url,this);
    }

    @Override
    public void sendError(VolleyError error) {
        inOrOutRecordView.dissLoading();
    }

    @Override
    public void recList(List<InorOutRecordInfo> infoList) {
        inOrOutRecordView.recList(infoList);
        inOrOutRecordView.dissLoading();
    }
}